package com.autumn.config.api;

import java.util.Collection;
import java.util.List;

import com.autumn.config.api.consts.ConnectionTypeInfo;
import com.autumn.config.api.vo.ApplicationInfoValue;
import com.autumn.config.api.vo.ServiceConnectionConfigureValue;
import com.autumn.config.api.vo.ServiceDataSourceConfigureValue;
import com.autumn.config.api.vo.ServiceDataSourceValue;
import com.autumn.config.api.vo.ServiceIdentityValue;
import com.autumn.config.api.vo.ServiceBaseValue;
import com.autumn.config.api.vo.ServiceProfileValue;
import com.autumn.config.api.vo.ServiceProfileInfo;

/**
 * 配置服务
 * 
 * @author 老码农
 *
 *         2018-06-28 15:05:06
 */
public interface CloudConfigService {

	/**
	 * 获取服务连接列表
	 * 
	 * @param service
	 *            服务
	 * @return
	 */
	List<ServiceConnectionConfigureValue> serviceConnectionList(ServiceBaseValue service);

	/**
	 * 获取服务连接
	 * 
	 * @param identity
	 *            身份
	 * @return
	 */
	ServiceConnectionConfigureValue serviceConnection(ServiceIdentityValue identity);

	/**
	 * 获取服务数据源
	 * 
	 * @param target
	 *            目标
	 * @return
	 */
	ServiceDataSourceConfigureValue serviceTargetDataSource(ServiceDataSourceValue target);

	/**
	 * 基于服务id进行查询
	 * 
	 * @param service
	 *            服务
	 * @return
	 *
	 */
	ApplicationInfoValue serviceQueryById(ServiceBaseValue service);

	/**
	 * 服务配置
	 * 
	 * @param profile
	 *            配置
	 * @return
	 *
	 */
	ServiceProfileInfo serviceProfile(ServiceProfileValue profile);
	
	/**
	 * 连接类型列表
	* @return
	*
	 */
	 Collection<ConnectionTypeInfo> connectionTypeList();
}
